package com.jic.interaction.onlineService.controller;
import com.jic.interaction.onlineService.model.vo.request.Order;
import com.jic.interaction.onlineService.model.vo.request.OrderInformation;
import com.jic.interaction.onlineService.model.vo.response.OrderResponse;
import com.jic.interaction.onlineService.service.OnlineService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Auther YGH
 * @DATE 2020/11/11/13:54
 */
@RestController
@RequestMapping()
public class OnlineController {

    @Resource
    private OnlineService service;

    /**
        • 客服查询订单信息
          简要描述：
        • 客服查询订单信息
          请求方式：
        • RMB
        • 部署ADM
        • 服务ID 12300232
        • 场景ID 01
        • 调用类型 0-同步
        • 业务类别 12-综合类
     */

    @ApiOperation(value = "客服查询订单信息")
    @PostMapping("/selectList")
    @ResponseBody
    public OrderResponse selectList(@RequestBody OrderInformation information) throws Throwable {
        Order order = new Order();
        BeanUtils.copyProperties(information,order);

        OrderResponse dto = service.selectList(order);

        return dto;
    }

}
